<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</meta>
<title>F().append</title>
<link type="text/css" rel="stylesheet" href="../css/admin.css" />
<link type="text/css" rel="stylesheet" href="../css/item_show.css" />
<script type="text/javascript" src="../../1st.js"></script>
<script type="text/javascript" src="../../1st.highlight.js"></script>
</head>
<body id="split">
<div id="content">
	<div rel="F.param">
		<h2><span>返回值:</span>F().append</h2>
					<h3>概述 : 追加节点</h3>
						
			<div class="desc">
				<div class="longdesc"><pre>给指定元素差入一个子节点</pre></div>
			</div>
							<h3>语法1：F().append(tagExpression, index)</h3>
						<table class="args">
				<!--caption>参数列表：(2)</caption-->
				<tr><th>参数名称</th><th>类型</th><th>描述</th></tr>
									<tr><td><strong>tagExpression</strong></td><td>String</td><td>标签名 或 HTML代码 或 [标签名].[class名]</td></tr>
									<tr><td><strong>index</strong><em> (可选)</em></td><td>Number</td><td>默认为-1，即添加到最后，取值可以是正数或者负数，添加到指定位置</td></tr>
								<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td>返回值</td><td>fdom</td><td>返回新增子元素的dom链</td></tr>
			</table>
				<div class="example">
			<h3>示例 : </h3>
							<h5 xmlns="">CSS代码:</h5>
				<pre xmlns=""><code id="cssbox"></code></pre>
						
							<h5 xmlns="">HTML代码:</h5>
				<pre xmlns=""><code id="htmlbox"></code></pre>
									
				<h5 xmlns="">JS代码:</h5>
				<pre xmlns=""><code id="jsbox"></code></pre>
								</div>
		<div style="text-align:right">
			
					
				<button onclick="window.open('../codepages/21.html');">运行代码</button>
						
		</div><br/>	
		<div>
			<h3>同类参考 :</h3>
			<div>
							<span><a href='151.html'>F().full</a></span>&#12288;|&#12288;							<span><a href='131.html'>F().remove</a></span>&#12288;|&#12288;							<span><a href='45.html'>F().empty</a></span>						</div>
		</div>
	</div>
</div><br />

<textarea id="css" style="display:none;">#box{width:300px; height:100px; background-color:red;}
#box .inbox{background-color:blue; margin-top:10px;}</textarea>
<textarea id="html" style="display:none;"><div id="box"></div></textarea>
<textarea id="js" style="display:none;">F("box").append("div").html("I am a box child2");
F("box").append("div.inbox",0).html("I am a box child1");//让新添加的节点成为第1个节点</textarea>
<textarea id="result" style="display:none;"></textarea>


<script type="text/javascript">
var css = F('css').val();
var html = F('html').val();		
var js = F('js').val();
var result = F('result').val();
css && F('cssbox').highlight(css, "css");
html && F('htmlbox').highlight(html, "html");
js && F('jsbox').highlight(js, "js");
result && F('resultbox').highlight(result,"js");
</script>

</body>
</html>